/*
# File    :   err_code_demo.c
# Author  :   SCHIPS
# Mail    :   schips@dingtalk.com
# Git     :   https://gitee.com/schips/
# Date    :   Tue, May 21, 2019 11:21:56 AM
*/

#include <stdio.h>
#include "err_code.h"
int main(int argc, char *argv[])
{
    ERR_CODE err_code ;
    ERR_CLASS err_class;
    ERR_NUMBER err_number;

    err_code = get_err_code(NET_ERR, NET_TIMEOUT);

    err_class = get_err_class(err_code);
    if(err_class == NET_ERR)
    {
        printf("err class : OK\n");
    }

    err_number = get_err_number(err_code);
    if(err_number == NET_TIMEOUT)
    {
        printf("err number : OK\n");
    }

    printf("0x%x, 0x%x, 0x%x\n", err_code, err_class, err_number);
    return 0;
}
